/**
 * Created by admin on 2016/8/16.
 */
var addNewAddress = function () {

    /*城市选择初始化*/
    var cityPickerInit = function () {
        var area2 = new LArea();
        area2.init({
            'trigger': '#area',
            'valueTo': '#areashow',
            'keys': {
                id: 'value',
                name: 'text'
            },
            'type': 2,
            'data': [provs_data, citys_data, dists_data]
        });
    };

    /*设为默认地址样式*/
    var setFaultAdd = function () {
        $('.setFaultAdd').click(function () {
            if ($(this).find('i').hasClass('set-address-icon')){
                $(this).find('i').removeClass('set-address-icon').addClass('default-address-icon');
            }else{
                $(this).find('i').addClass('set-address-icon').removeClass('default-address-icon');
            }
        })
    };




   return {
       init:function(){
         cityPickerInit();
         setFaultAdd();
       }
   }
}();